Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: migrate to Blocktank client v2 #2350

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

fix: migrate to Blocktank client v2 #2350

wants to merge 2 commits into from

Conversation

limpbrains
Copy link
Collaborator

@limpbrains limpbrains commented Nov 14, 2024

Description

Migrate to the new blocktank http client v2

Linked Issues/Tasks

Type of change

Refactoring

Tests

No test

Copy link

socket-security bot commented Nov 14, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@synonymdev/[email protected] None 0 79.9 kB dzdidi_restored

🚮 Removed packages: npm/@synonymdev/[email protected]

View full report↗︎

@@ -41,7 +41,7 @@ const ReceiveConnect = ({
const { maxChannelSizeSat } = blocktank.options;
const minChannelSize = Math.round(amount * 2.5);
const maxChannelSize = Math.round(maxChannelSizeSat / 2);
const channelSize = Math.max(minChannelSize, maxChannelSize);
const channelSize = Math.min(minChannelSize, maxChannelSize);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a mistake here. minChannelSize = amount * 2.5 and it can be bigger than maxChannelSize
Looks like it was changed at 2a6b1fb by mistake

Copy link
Collaborator Author

@limpbrains limpbrains Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it should be ?

const channelSize = min(max(amount * 2.5, maxChannelSizeSat / 2), maxChannelSizeSat);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah looks wrong, but I think in that case BT will return an error. I'd say leave it for now. I have a task to update these values to the new policy here

@limpbrains limpbrains self-assigned this Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants